package com.lmt.feign;

import com.lmt.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;


/**
 * @Description: TODO
 * @Author: Amazing
 * @Date: 2022/7/28 13:51
 * @Version: 1.0
 */
@FeignClient(value = "user-server", fallbackFactory = UserFeignClientFallback.class)
public interface UserFeignClient {

    //订单服务来调用这个方法      http://localhost:1020/user/10
    // @GetMapping(value = "/user/{id}" )
    @GetMapping("/user/getUserById/{id}")
    User getUserById(@PathVariable Long id);

}
